package com.tx.admin.entity.rbac;

import javax.persistence.Entity;

import com.tx.admin.entity.TreeEntity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Entity
@Data
public class DataPermissionEntity extends TreeEntity<DataPermissionEntity> {

	//目标
	@ApiModelProperty("服务对象")
	private String dataService;
	
	//数据操作
	@ApiModelProperty("函数对象")
	private String dataMethod;
	
	//数据范围
	@ApiModelProperty("权限范围")
	private String dataScope;
	
	public  enum DataScope{
		user_none("无"),
		user_one("自身"),
		department_one("当前部门"),
		department_tree("当前部门及其下属部门"),
		organization_one("当前组织"),
		;
		public String getContent() {
			return content;
		}

		private final String content;

		private DataScope(String content) {
			this.content = content;
		}
		
		public String toString() {
			return this.content;
		}
	}


	
}
